'use strict'
const path = require('path')

function resolve(dir) {
  return path.join(__dirname, dir)
}
const port = 80 // dev port
const name = 'vue-admin'
module.exports = {
  // baseUrl:'Vue_template',
  outputDir: 'dist',
  publicPath: './',
  lintOnSave: false,
  productionSourceMap: false,
  devServer: {
    port: port,
    open: false,
    host:'0.0.0.0',
    proxy: {
      '/api': {
        changeOrigin:true,
        target: process.env.VUE_APP_HOST,
        // changeOrigin: true,
        ws:false,
        pathRewrite: {
          '^/api': '/'
        }
      },
      '/static': {
        changeOrigin:true,
        target: process.env.VUE_APP_HOST,
        // changeOrigin: true,
        ws:false,
        pathRewrite: {
          '^/static': '/static'
        }
      },
    }
  },
  configureWebpack: {
    name: name,
    resolve: {
      alias: {
        '@': resolve('src')
      }
    }
  },
}